<div *ngIf="list.length > 0; then todoList else noTodo"></div>
<ng-template #noTodo>
  <div class="no-item">
    no todo item, please add todo
  </div>
</ng-template>
<ng-template #todoList>
  <ul class="list">
    <li *ngFor="let item of list; trackBy: identify" class="flex-style">
      <div class="flex-item-input">
        <input [checked]="false" type="checkbox" [name]="item.content" [id]="item.id" #inputItem>
        <div style="display: inline-block;">{{ item.content }}</div>
      </div>
      <button class="flex-item-btn" (click)="delete(inputItem.id, inputItem.checked)">删除</button>
    </li>
  </ul> 
</ng-template>
